<?php
my_component_load('testing' , false);
my_component_load('paging' , false);
my_component_load('list_kalender' , false);
my_component_load('rpt_employment_count', false);
$task = isset($_GET['task']) ? $_GET['task'] : ""; 
$periode_id = isset( $_GET['periode_id'] ) ? $_GET['periode_id']:  0; 
$tab = isset( $_GET['tab'] ) ? $_GET['tab']:  0; 
$id = isset( $_GET['id'] ) ? $_GET['id']:  0; 
$tgl = isset( $_GET['tgl'] ) ? $_GET['tgl']:  date('Y-m-d'); 

$modulname = "Reporting _BN_ Employment Count";

if($task == "detail"){
	$pagename = $modulname;
	load_facebox_script();	
	$view = list_karyawan($tgl,$tab,$id); 
}elseif($task == "plaincetak"){
	@ob_end_clean(); 
	echo'<pre>';
	echo print_plain($tgl);
	exit;
}elseif($task == "excel"){
	header("Content-Type: application/xls");
	header("Content-Disposition: attachment;filename=profil_sdm.xls");
	echo excel_report($tgl);
	exit;	
}elseif($task == "excel_daftar_kekaryawan"){
	header("Content-Type: application/xls");
	header("Content-Disposition: attachment;filename=profil_sdm_karyawan.xls");
	echo excel_daftar_kekaryawan($tgl,$tab,$id);
	exit;	
}else{
	$pagename = $modulname;
	load_facebox_script();	
	$view = list_employment_count($periode_id); 
}	
generate_my_web($view, $pagename );

?>